package com.wanxi.web.service.repertory.impl;

import com.wanxi.repertory.service.api.feign.RepertoryShopService;
import com.wanxi.repertory.service.api.query.RepertoryQuery;
import com.wanxi.repertory.service.api.result.CommonResult;
import com.wanxi.repertory.service.api.vo.*;
import com.wanxi.web.service.repertory.RepertoryWebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: RepertoryWebServiceImpl
 * Description:
 * date: 2022/1/21 14:15
 *
 * @author lxl
 * @version 1.0
 * @since JDK 1.8
 */
@Service
public class RepertoryWebServiceImpl implements RepertoryWebService {


    @Autowired
    private RepertoryShopService service;

    @Override
    public CommonResult<List<Long>> findSkuIdByShopId(Long shopId) {
        return service.findSkuIdByShopId(shopId);
    }

    @Override
    public CommonResult<List<Long>> findSkuIdDescSaleTotal() {
        return service.findSkuIdDescSaleTotal();
    }

    @Override
    public CommonResult<RepertoryTotalFindByIdOutVo> findTotalBySkuId(Long skuId) {
        return service.findTotalBySkuId(skuId);
    }

    @Override
    public CommonResult updateTotal(RepertoryTotalUpdateInVo repertoryUpdateInVo) {
        return service.updateTotal(repertoryUpdateInVo);
    }

    @Override
    public CommonResult allocate(RepertoryTotalAllocateInVo skuAllocateInVo) {
        return service.allocate(skuAllocateInVo);
    }

    @Override
    public CommonResult<Long> addRecord(RepertoryRecordAddInVo repertoryAddInVo) {
        return addRecord(repertoryAddInVo);
    }

    @Override
    public CommonResult<RepertoryRecordFindAllOutVo> findAllRecord(RepertoryQuery repertoryQuery) {
        return service.findAllRecord(repertoryQuery);
    }

    @Override
    public CommonResult<RepertoryRecordFindByIdOutVo> findRecordById(Long repertoryId) {
        return service.findRecordById(repertoryId);
    }
}
